﻿<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<body>
    <div class="container">
        <input type="text" id="commnet" name=" ">
        <input type="submit" id="Butten" value="提交" onclick="submit()"><br>
    </div>
        <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
        <script>

            function submit() {
                //1. 获取留言的内容
                var from = $('#commnet').val();
                //2. 构造节点
               
                //3. 把节点添加到页面上
                $(".container").append(from);

                
               

            }

        </script>
</body>
</html>